package cn.eric.framework.auth.dao.i;

import cn.eric.framework.auth.dao.AuthorityDao;
import cn.eric.framework.auth.domain.Authority;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Repository
@Transactional
public class IAuthorityDao implements AuthorityDao {
    @Resource
    private HibernateTemplate hibernateTemplate;

    @Override
    public void save(Authority authority) {
        hibernateTemplate.saveOrUpdate(authority);
    }
}
